package jwf.http;

/**
 * http constants define
 * @author michael
 * @email  liyong@renren-inc.com 
 *
 */
public interface Http {
    String CRLF = "\r\n";

    public enum HttpVerb {
	HV_GET, HV_POST, HV_PUT, HV_DELETE, HV_CONNECT, HV_HEAD, HV_INVALID
    }

    // http header
    String HH_ACCEPT = "Accept";
    String HH_ACCEPT_CHARSET = "Accept-Charset";
    String HH_ACCEPT_ENCODING = "Accept-Encoding";
    String HH_ACCEPT_LANGUAGE = "Accept-Language";
    String HH_AGE = "Age";
    String HH_CACHE_CONTROL = "Cache-Control";
    String HH_CONNECTION = "Connection";
    String HH_CONTENT_LENGTH = "Content-Length";
    String HH_CONTENT_RANGE = "Content-Range";
    String HH_CONTENT_TYPE = "Content-Type";
    String HH_COOKIE = "Cookie";
    String HH_DATE = "Date";
    String HH_ETAG = "ETag";
    String HH_EXPIRES = "Expires";
    String HH_HOST = "Host";
    String HH_IF_MODIFIED_SINCE = "If-Modified-Since";
    String HH_IF_NONE_MATCH = "If-None-Match";
    String HH_KEEP_ALIVE = "Keep-Alive";
    String HH_LAST_MODIFIED = "Last-Modified";
    String HH_LOCATION = "Location";
    String HH_PROXY_AUTHENTICATE = "Proxy-Authenticate";
    String HH_PROXY_AUTHORIZATION = "Proxy-Authorization";
    String HH_PROXY_CONNECTION = "Proxy-Connection";
    String HH_RANGE = "Range";
    String HH_SERVER = "Server";
    String HH_SET_COOKIE = "Set-Cookie";
    String HH_TE = "TE";
    String HH_TRAILERS = "Trailers";
    String HH_TRANSFER_ENCODING = "Transfer-Encoding";
    String HH_UPGRADE = "Upgrade";
    String HH_USER_AGENT = "User-Agent";
    String HH_WWW_AUTHENTICATE = "WWW-Authenticate";

    // http status code
    // / informational codes
    int HC_CONTINUE = 100;
    int HC_SWITCHING_PROTOCOLS = 101;
    int HC_PROCESSING = 102;

    // / success codes
    int HC_OK = 200;
    int HC_CREATED = 201;
    int HC_ACCEPTED = 202;
    int HC_NON_AUTHORATIVE_INFORMATION = 203;
    int HC_NO_CONTENT = 204;
    int HC_RESET_CONTENT = 205;
    int HC_PARTIAL_CONTENT = 206;
    int HC_MULTI_STATUS = 207;

    // / redirect codes
    int HC_MULTIPLE_CHOICES = 300;
    int HC_MOVED_PERMANENTLY = 301;
    int HC_FOUND = 302;
    int HC_SEE_OTHER = 303;
    int HC_NOT_MODIFIED = 304;
    int HC_USE_PROXY = 305;
    int HC_SWITCH_PROXY = 306;
    int HC_TEMPORARY_REDIRECT = 307;

    // / domain error codes
    int HC_BAD_REQUEST = 400;
    int HC_UNAUTHORIZED = 401;
    int HC_PAYMENT_REQUIRED = 402;
    int HC_FORBIDDEN = 403;
    int HC_NOT_FOUND = 404;
    int HC_METHOD_NOT_ALLOWED = 405;
    int HC_NOT_ACCEPTABLE = 406;
    int HC_PROXY_AUTHENTICATION_REQUIRED = 407;
    int HC_REQUEST_TIMEOUT = 408;
    int HC_CONFLICT = 409;
    int HC_GONE = 410;
    int HC_LENGTH_REQUIRED = 411;
    int HC_PRECONDITION_FAILED = 412;
    int HC_REQUEST_ENTITY_TOO_LARGE = 413;
    int HC_REQUEST_URI_TOO_LONG = 414;
    int HC_UNSUPPORTED_MEDIA_TYPE = 415;
    int HC_REQUEST_RANGE_NOT_SATISFIABLE = 416;
    int HC_EXPECTATION_FAILED = 417;
    int HC_UNPROCESSABLE_ENTITY = 422;
    int HC_LOCKED = 423;
    int HC_FAILED_DEPENDENCY = 424;
    int HC_UNORDERED_COLLECTION = 423;
    int HC_UPGRADE_REQUIRED = 424;
    int HC_RETRY_WITH = 449;

    // / internal error codes
    int HC_INTERNAL_SERVER_ERROR = 500;
    int HC_NOT_IMPLEMENTED = 501;
    int HC_BAD_GATEWAY = 502;
    int HC_SERVICE_UNAVAILABLE = 503;
    int HC_GATEWAY_TIMEOUT = 504;
    int HC_HTTP_VERSION_NOT_SUPPORTED = 505;
    int HC_INSUFFICIENT_STORAGE = 506;
    int HC_BANDWIDTH_LIMIT_EXCEEDED = 509;

}
